package com.example.cake.entity;


import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

import java.time.LocalDateTime;

@Data
@TableName("sys_cake")
public class SysCake {
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    private String name;
    private String price;
    private String size;
    private String img;
    private String cakeDescribe;
    private String flavorId;
    private String crowdId;
    private String store;
    private String classifyId;
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createTime;
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime updateTime;
    @TableLogic(value = "0", delval = "1")
    @JsonProperty(access = JsonProperty.Access.WRITE_ONLY) //逻辑删除不返回给前端
    private String isDelete;
    @TableField(exist = false)
    private String classifyName;
    @TableField(exist = false)
    private String crowdName;
    @TableField(exist = false)
    private String flavorName;
}

